package com.main.ok.lucene;

import java.io.IOException;
import java.nio.file.FileVisitResult;
import java.nio.file.FileVisitor;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;

public class Main {

    public static void main(String[] args) throws IOException {
        String path = "e:/data";
        Path p = Paths.get(path);
        Files.walkFileTree(p, new SimpleFileVisitor<Path>() {
            @Override
            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
                // TODO Auto-generated method stub
                System.out.println(file.getFileName());
                return super.visitFile(file, attrs);
            }
        });
    }

    public void say() throws IOException {
        Files.walkFileTree(Paths.get(""), null);
    }

}
